projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50654cf
)
Improve preserving X coordinate during scroll commands
author
Eli Zaretskii
<eliz@gnu.org>
Thu, 13 Jan 2022 12:21:10 +0000
(14:21 +0200)
committer
Eli Zaretskii
<eliz@gnu.org>
Thu, 13 Jan 2022 12:21:10 +0000
(14:21 +0200)
* src/window.c (window_scroll_pixel_based): Don't unnecessarily
move the iterator. (Bug#53220)
src/window.c
patch
|
blob
|
history
diff --git
a/src/window.c
b/src/window.c
index 7155f0e6bc363f859deb1dfae12cc8f0109bbb18..2a5e4042a48dfc3503461433ca4a3beb0acea8f8 100644
(file)
--- a/
src/window.c
+++ b/
src/window.c
@@
-5861,7
+5861,8
@@
window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
/* We moved the window start towards ZV, so PT may be now
in the scroll margin at the top. */
- move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
+ if (IT_CHARPOS (it) < PT)
+ move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
if (IT_CHARPOS (it) == PT
&& it.current_y >= this_scroll_margin
&& it.current_y <= last_y - WINDOW_TAB_LINE_HEIGHT (w)